//
//  MyThrowingBallButton.h
//  CanYouDoIt
//
//  Created by hoangtx on 7/17/13.
//
//

#ifndef CanYouDoIt_MyThrowingBallButton_h
#define CanYouDoIt_MyThrowingBallButton_h

#include "MySpriteButton.h"
using namespace cocos2d;
class MyThrowingBallButton : public MySpriteButton{
public:
    bool isFlying;
    double velocityX;
    double offsetAround;
    CCPoint originalPosition;
    CCTouch* beginTouch;
    CCPoint beginPoint;
    CCPoint endPoint;
    void goBackToOriginalPosition();
    CCTouch* getTouchThatHit(CCSet* touches);
    void handleUpdate(float dt);
    virtual bool isTouchedAt(CCPoint touchPosition);
    virtual void handleMultiTouchesBegan(CCSet* touches, CCEvent* pEvent);
    virtual void handleMultiTouchesMoved(CCSet* touches, CCEvent* pEvent);
    virtual void handleMultiTouchesEnded(CCSet* touches, CCEvent* pEvent);
    virtual bool init();
    CREATE_FUNC(MyThrowingBallButton);
};

#endif
